package com.im.business.history.service;

import com.alibaba.fastjson.JSONObject;
import com.im.business.history.entity.MessageHistory;
import com.im.business.history.mapper.MessageHistoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Created leijun
 * @Date 2021/10/27 7:11 上午
 */
@Service
public class GroupMessageService {

    @Autowired
    private MessageHistoryMapper messageHistoryMapper;

    /**
     * 保存群聊消息
     * @param message
     */
    public void saveGroupMessage(JSONObject message) {

    }

    public List<MessageHistory> selectHistoryMessage(Long groupId, Long maxOffset) {
        return messageHistoryMapper.selectGroupHistoryMessage(groupId, maxOffset);
    }
}
